raar.register
Class RAFetchRegister

java.lang.Object
  extended by raar.register.RARegister
      extended by raar.register.RAFetchRegister
All Implemented Interfaces:
java.io.Serializable

public class RAFetchRegister
extends RARegister
implements java.io.Serializable

This class defines a register for which you can only get values that already exist, and which can be fetched COMPLETELY from an other register. In RAAR it is used to model process outputs. Once you have set the keys which should be in the register, it locks up and cannot be changed except using the copyFromRegister method.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class raar.register.RARegister
initialObjectVector, nameVector, objectVector
 
Constructor Summary
RAFetchRegister()
          Construct a new register
RAFetchRegister(java.util.Vector names)
          Construct a register which can contain values for keys (Strings) defined in the Vector.
 
Method Summary
 void add(java.lang.String name, RADataType dt)
          This method is not supported; you may not add any new keys!
 void clearRegister(RARegister r)
          Replace the complete content by null.
 void copyFromRegister(RARegister r)
          Copy values from the specified Register into this Register, for all the keys (names) that exist in this Register.
 void set(java.lang.String name, RADataType dt)
          This method is not supported; you may never set a new value.
 void setNameVector(java.util.Vector names)
          Set the keys this register can contain.
 java.lang.String toString()
           
 
Methods inherited from class raar.register.RARegister
accepts, clearRegister, get, getNameVector, getObjectVector, getType, nameExists, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RAFetchRegister

public RAFetchRegister()
Construct a new register


RAFetchRegister

public RAFetchRegister(java.util.Vector names)
Construct a register which can contain values for keys (Strings) defined in the Vector. You can do this only once (i.e. calling setNameVector no longer is allowed).

Method Detail

setNameVector

public void setNameVector(java.util.Vector names)
Set the keys this register can contain. You can do this only once! Will throw a dirty exception (division by zero) when an attempt is made anyway.


add

public void add(java.lang.String name,
                RADataType dt)
         throws RAException
This method is not supported; you may not add any new keys! Throws an exception when called.

Overrides:
add in class RARegister
Throws:
RAException

set

public void set(java.lang.String name,
                RADataType dt)
         throws RAException
This method is not supported; you may never set a new value. Throws an exception when called.

Overrides:
set in class RARegister
Throws:
RAException

copyFromRegister

public void copyFromRegister(RARegister r)
                      throws RAException
Copy values from the specified Register into this Register, for all the keys (names) that exist in this Register. Throws exception if any of the names does not exist in r.

Throws:
RAException

clearRegister

public void clearRegister(RARegister r)
                   throws RAException
Replace the complete content by null. I.e. every key requested will have an associated null output value. Also if you specify a register as an argument, in that register the values for keys also in this register will be set to null. Now read that again and try to understand :-)

Throws:
RAException

toString

public java.lang.String toString()
Overrides:
toString in class RARegister